<?php

namespace app\admin\model\finance\extract;

use think\Model;

class Note extends Model
{
    // 表名
    protected $name = 'finance_extract_task_note';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
 	 // 追加属性
    protected $append = [
        'username',
    ];
   public function getUsernameAttr($value, $data){        
        $value = $value ? $value : $data['publish'];
        $list = TableField('Admin','username',$value,'userid');
        return isset($list) ? $list : '';
    }

}
